package top.luoblog.observer.withjdk.push;

import org.junit.Test;

/**
 * @author : luo
 * @date : 2020/7/16
 * @description : 主题推送给观察者
 */
public class ObserverTest {

    @Test
    public void test1() throws Exception {
        CounterObservable observable = new CounterObservable();
        observable.addObserver(new CounterObserver());
        observable.setCount(0);
        observable.setCount(1);
    }

}
